﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace MyApp.Common
{
    public class AppSettingModel
    {

        public class Rootobject
        {
            public Logging Logging { get; set; }
            public Startup Startup { get; set; }
            public string AllowedHosts { get; set; }
            public string urls { get; set; }
            public string SqlConn { get; set; }
            public Redis Redis { get; set; }
            public Connectionconfig[] ConnectionConfigs { get; set; }
        }

        public class Logging
        {
            public Loglevel LogLevel { get; set; }
        }

        public class Loglevel
        {
            public string Default { get; set; }
            public string Microsoft { get; set; }
            public string MicrosoftHostingLifetime { get; set; }
        }

        public class Startup
        {
            public Cors Cors { get; set; }
            public Appconfigalert AppConfigAlert { get; set; }
            public string ApiName { get; set; }
            public Identityserver4 IdentityServer4 { get; set; }
            public Redismq RedisMq { get; set; }
            public Miniprofiler MiniProfiler { get; set; }
            public Nacos Nacos { get; set; }
        }

        public class Cors
        {
            public string PolicyName { get; set; }
            public bool EnableAllIPs { get; set; }
            public string IPs { get; set; }
        }

        public class Appconfigalert
        {
            public bool Enabled { get; set; }
        }

        public class Identityserver4
        {
            public bool Enabled { get; set; }
            public string AuthorizationUrl { get; set; }
            public string ApiName { get; set; }
        }

        public class Redismq
        {
            public bool Enabled { get; set; }
        }

        public class Miniprofiler
        {
            public bool Enabled { get; set; }
        }

        public class Nacos
        {
            public bool Enabled { get; set; }
        }

        public class Redis
        {
            public string ConnectionString { get; set; }
        }

        public class Connectionconfig
        {
            public string ConnectionString { get; set; }
            public int DbType { get; set; }
            public string ConfigId { get; set; }
            public bool IsAutoCloseConnection { get; set; }
        }

    }
}
